<template>
  <div class="common-layout">
    <el-header class="flex-r-c-c">
      <h2>欢迎</h2>
    </el-header>
    <el-container>
      <el-aside width="200px">
        <slideBar :slideBar="config.slideBar"></slideBar>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script setup>
import slideBar from "@/components/slideBar";
import { ref, reactive, shallowRef, computed } from "vue";

const value = ref("这里是markeDown<a>123456</a>代码块识别区域");

const config = reactive({
  slideBar: [
    {
      id: 1,
      name: "菜单",
      children: [
        {
          id: 1,
          name: "相册",
          router: "/index/daohang01/myPhoto",
        },
        {
          id: 2,
          name: "导航1-2",
          router: "/index/daohang01/f",
        },
        {
          id: 3,
          name: "导航1-3",
        },
        {
          id: 4,
          name: "导航1-4",
        },
      ],
    },
    {
      id: 2,
      name: "导航2",

      children: [
        {
          id: 1,
          name: "导航2-1",
          router: "/mycharts01",
        },
        {
          id: 2,
          name: "导航2-2",
          router: "/chinaMap",
        },
        {
          id: 3,
          name: "导航2-3",
        },
        {
          id: 4,
          name: "导航2-4",
        },
      ],
    },
    {
      id: 3,
      name: "导航3",
      children: [
        {
          id: 1,
          name: "html",
          router: "/html",
        },
        {
          id: 2,
          name: "css",
          router: "/css",
        },
        {
          id: 3,
          name: "git",
          router: "/git",
        },
        {
          id: 4,
          name: "js",
          router: "/js",
        },
      ],
    },
    {
      id: 4,
      name: "导航4",
      children: [
        {
          id: 1,
          name: "导航4-1",
        },
        {
          id: 2,
          name: "导航4-2",
        },
        {
          id: 3,
          name: "导航4-3",
        },
        {
          id: 4,
          name: "导航4-4",
        },
      ],
    },
  ],
});
</script>

<style lang="scss">
* {
  margin: 0;
  padding: 0;
}
.common-layout {
  width: 100%;
  height: 100%;
  .el-container {
    height: calc(100% - 60px);
    .el-header {
      height: 50px;
      .head {
        width: 100%;
        height: 100%;
      }
    }
    .el-aside {
      height: 100%;
    }
    .el-main {
      padding: 0;
      background-color: #000000;
      height: 100%;
    }
  }
}
</style>